module.exports = {
    devServer: {
        open: true,
        host: 'localhost',
        port: 8080,
        https: false,
        hotOnly: false,
        proxy: {
            // 配置跨域
            '/api': {
                target: 'http://utf8.api.smschinese.cn',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            },
            '/sms_api': {
                target: 'https://h5.ele.me/restapi/eus/login/mobile_send_code',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/sms_api': ''
                }
            },
            '/login_api': {
                target: 'https://h5.ele.me/restapi/eus/login/login_by_mobile',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/login_api': ''
                }
            },
            '/cityapi': {
                target: 'https://shadow.elemecdn.com/lib/city-list@0.0.3/city_list.json',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/cityapi': ''
                }
            },
            '/eleapi': {
                target: 'https://elm-api.caibowen.net/shopping/restaurants',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/eleapi': ''
                }
            },
            '/goods': {
                target: 'https://elm-api.caibowen.net/shopping/goods',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/goods': ''
                }
            },
            '/shop': {
                target: 'https://elm-api.caibowen.net/shopping/seller',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/shop': ''
                }
            },
            '/rating': {
                target: 'https://elm-api.caibowen.net/shopping/ratings',
                ws: true,
                changOrigin: true,
                pathRewrite: {
                    '^/rating': ''
                }
            },

        },
        before: app => { }
    },
};
